package com.ld.control.business.equipment.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ld.control.business.equipment.service.ReagentService;
import com.ld.control.business.equipment.vo.resp.EquipmentRespVo;
import com.ld.control.business.equipment.vo.resp.ReagentRespVo;
import com.ld.control.common.ResultResponse;
import com.ld.control.common.vo.GeneratePageListVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Tag(name = "试剂相关接口")
@RestController
public class ReagentController {

    @Autowired
    private ReagentService reagentService;

    @GetMapping("/api/centralControl/reagent/getPageList")
    @Operation(summary = "试剂列表 ")
    public ResultResponse<GeneratePageListVo<ReagentRespVo>> getPageList(
            @RequestParam(required = false, defaultValue = "1") Integer current,
            @RequestParam(required = false, defaultValue = "10") Integer size
    ) {
        IPage<ReagentRespVo> equipmentServicePageList = reagentService.getPageList(current, size);
        return ResultResponse.success(new GeneratePageListVo<>(equipmentServicePageList));
    }
}
